import { createApp } from 'vue'
import App from './App.vue'
import directives from './directives'
import router from './router'
import {createPinia} from 'pinia'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
// 语言包
import locale from 'element-plus/es/locale/lang/zh-cn'

// tailwind css
import '@/assets/css/tailwind.css'
import '@/assets/css/main.css'

import components from '@/components/index.js'
import i18n from  '@/i18n'


let app = createApp(App);
// 注册指令
app.use(directives)
app.use(createPinia())
app.use(components)
app.use(router)
app.use(i18n)
// Element设置全局的大小
app.use(ElementPlus, {
    locale: locale,
    // 支持 large、default、small
    size: 'small'
})
app.mount('#app')
